import { SCROLLBER_TYPE, COMPONENT_TYPES,TIMER_PATTERN, RADIO_CHECKBOX_TYPE, CALENDER_TYPE_MAP,
  DEFAULT_MEDIAS, GRIDIENT_DIRECTION, PROCESS_ITEM_TYPES, PLACEHOLDER_COLOR_TYPE, RADIO_CHECKBOX_SHAPE_TYPES, 
  GLOBAL_POST_TYPES, BG_POSITION_REPEAT_TYPES_MAP, PAGINATION_TYPE, NOTICE_BAR_MODE, LINE_NUM} from '@/common/const'
import { COMMON_WIDTH, COMMON_HEIGHT  } from '@/common/const-dif'

import { COMMON_ITEM_TYPES, CAROUSEL_TYPES, CAROUSEL_COLOR_TYPES, CAROUSEL_POSITION_TYPE, COMMON_ITEM_STYLE_TYPE, ITEM_FLEX_DIRECTION_MAP, LIST_TYPE_MAP } from '@/common/const-items'
import { RESIZE_TYPE } from '@/common/const-canvas';

import { SVG_ANIMATE_PLAY_TYPE, SVG_ANIMATE_START_TYPE, SVG_ANIMATE_EASE_TYPE, SVG_D_LIST} from '@/common/const-shapes'
import { ANIMATE_TRIGGER_TYPE_MAP, GSAP_AXIS_TYPES_MAP, GSAP_FROM_TYPES_MAP, GSAP_EASE_TYPES_MAP, GSAP_EASE_INOUT_TYPES_MAP, SCROLL_TRIGGER_TYPE } from '@/common/const-animates';
import { FORM_LISTS, FORM_SCORE_LISTS } from '@/common/const-form'
import { TABLE_ITEM_TYPE } from '@/common/const-table'
import { SAVE_IMG_DATA_TYPES } from '@/common/events'

const defaultBtnAttr = {
  cid: COMPONENT_TYPES.wb_btn,
  bgUrl: "",
  oriEvents: [{ controlId: "submit", eventType: "submit"}],
  type: "wb-btn",
  name: "WbBtn",
  title: "按钮样式",
  tabName: "submit",
  styles: {
    fontSize: "28px",
    fontFamily: "默认字体",
    textAlign: "center",
    lineHeight: 1,
    letterSpacing: "0px",
    transform: "rotate3d(0, 0, 1, 0deg)",
    opacity: 1,
    color: "rgba(139, 69, 59, 1)",
    backgroundColor: "rgba(0, 0, 0, 0)",
    backgroundImage: "url()",
    borderRadius: 0,
    border: "none",
  },
  conAttr: { width: 484/2, height: 92/2 },
  commonAttr: {
    width: 0, height: 0,
    fontSize: 14, fontWeight:0, rotate:0, marginLR: 0, marginTB: 0, paddingLR: 0, paddingTB: 0,
    borderStyle: 'none', borderRadius: 0, borderSize: 0, borderColor: '', 
    isSelected: false, selectedColor: '', selectedBGColor: '', 
    isDisabled: false, isGrey: false, customFontStyle: '',
    title: '提交', btnPosition: '', 
  }
}

export const defaultCommonListCommonAttr = { 
  itemType: COMMON_ITEM_TYPES[0].value, columnNum: 1, bgPositionRepeatType: BG_POSITION_REPEAT_TYPES_MAP.centerTop,
  marginTB: 0, marginLR: 0, paddingTB: 0, paddingLR: 0, comPositionType: CAROUSEL_POSITION_TYPE[0].value,
  isBtn: false, fontSize: 12, isSort: false, isAddReposts: false, isAutoY: false, bgUrl: '', 
  topDistance: 0, bottomDistance: 0,
  isCustomText: false, textPrefix:'', styleType: COMMON_ITEM_STYLE_TYPE[0].value,
  min: 1, max: 1, lineNum: LINE_NUM[1].value,
  progressBarColor: "rgba(0, 0, 0, 1)", progressBarBgColor: "rgba(0, 0, 0, 1)", barImage: "",
  repostsNameColor: "rgba(0, 0, 0, 1)",
  isHeader: false, headerHtml: '', isFooter: false, footerHtml: '', itemNum: 1, isUserDescription: false,
  itemPicWidth: 0, itemPicHeight: 0,
  itemBgUrl: '', itemBGColor: "rgba(0, 0, 0, 0)", itemBorderSize: 0, itemBorderColor: '', itemWidth:0, itemHeight: 0,
  itemMarginTB: 0, itemMarginLR: 0, itemPaddingTB: 0, itemPaddingLR: 10, foldAttr: {btn:'', con:'', midPosition:'', clickPosition: '', userPosition: ''},
  itemBgs: "", votePosition: "", itemRanks: "", crownPosition: "", itemMedals: "", medalPosition: "", isShiftInArr: false, isFullScreen: false,
  titlePositionType: CAROUSEL_POSITION_TYPE[0].value,
}
export const defaultCarouselCommonAttr = { 
  itemType: "wb-item-common",
  paginationType:  PAGINATION_TYPE[0].value,
  paginationColorType: PAGINATION_TYPE[0].value,
  carouselType: CAROUSEL_TYPES[1].value, slideNum: 0, slideSpace: 0,
  autoTurnPage: false, turnPageTime: 0,
  borderSize: 0, borderColor: "rgba(0, 0, 0, 0)", borderStyle: 'none', 
  bgUrl: '', itemBgUrl: "", itemBgUrls:"", itemSelectedBgUrls:"", 
  paddingTB: 0, paddingLR: 0, 
  itemBGColor: "rgba(255, 255, 255, 0)", itemBorderSize: 0, itemBorderColor: "rgba(0, 0, 0, 0)", 
  itemWidth: 0, itemHeight: 0, itemMarginTB: 0, itemMarginLR: 0, itemPaddingTB: 0, itemPaddingLR: 0,
  isBtn: false, letterSpacing: 1, fontWeight: '',
  preBtnUrl: '', nextBtnUrl:'', swiperBtnWidth: "", swiperBtnHeight: "",
  comPositionType: CAROUSEL_POSITION_TYPE[1].value, topDistance: "-20", bottomDistance: "-10",
  fontSize: 10, initialSlide: 0,
  numberUrl: '', sames: '', differents: '', isLoop: false, questionPushRule: '', questionIndexStr: '',
  lineNum: 3, customStyle: '',
  customParams: '',
}

//[{"x":1,"y":1,"alpha":1,"scale":1},{"x":-836,"y":-220,"alpha":0.5}]
export const PathAnimate = {
  path: {
    type: 'none',//仅适用于当路径是一个对象数组x / y属性，锚,两个控制点,锚,两个控制点,锚等尽可能多的迭代
    isPathBezier: false,
    curviness: 1,//弯曲程度控制点个数
    autoRotate: false,//自动贴合路径旋转
    attrs: '',//[{"x":1,"y":1,"alpha":1,"scale":1},{"x":-836,"y":-220,"alpha":0.5}], 坐标是相对于组件的坐标
  },
  gsap: {
    durations: '1',
    repeat: -1,
    yoyo: false,
    ease: GSAP_EASE_TYPES_MAP.none, 
    easeInOut: GSAP_EASE_INOUT_TYPES_MAP.inOut,
    isOnComplete: null,
    onCompleteParams: '',
    options: '',
  }
}



export const ADD_COMP_ATTR = {
  commonAttr: {
    positionType: 0, 
    relateAttrCompId: '', 
    relateEventCompId:'', 
    itemIndex: -1,
    isBottom: false, 
    isRight: false, 
    isVisible: true,
    isPageFixed: false,
  },
  animate: {
    triggerType: ANIMATE_TRIGGER_TYPE_MAP.auto,
    isPlayAll: false,
    playAnimateIndex: -1,
    animates: [],
    isPathAnimate: false,
    isGsap: false,
  },
  conStyles: {width:0, height:0, position:'absolute', zIndex:0, top:0, left:0},
  styles: {},
  events: {},
}

export const DefaultStylesDom = {
  1:{
    fontSize: 14 + 'px',
    fontFamily: "默认字体",
    color: "rgba(0, 0, 0, 1)",
    backgroundColor: "rgba(255, 255, 255, 0)",
    textAlign: 'center',
    textDecoration: 'none',
    fontWeight: 'normal',
    fontStyle: 'normal',
    lineHeight: 1.6,
    letterSpacing: '1px',
    transform:'rotate(0deg)',
    opacity: 1,
    borderRadius: 0,
    border: 'none',
    textShadow: '',
  },
  2:{
    backgroundColor: "rgba(255, 255, 255, 0)",
    opacity: 1,
    transform:'rotate(0deg)',
    borderRadius: 0,
    border: 'none',
  },
  3:{
  },
  4:{
  },
  10:{

  },
  11:{
    border: "none"
  },
  14:{
    fontSize: 14 + 'px',
    color: "rgba(255, 255, 255, 1)",
    backgroundColor: "rgb(248, 99, 59)",
  },
  18:{
    fontSize: 14 + 'px',
    color: "rgba(255, 255, 255, 1)",
    backgroundColor: "#43475C",
    opacity: 1,
    backgroundImage: "",
  },
  20:{
    opacity: 1,
  },
  21:{
    opacity: 1,
  },
  22:{
    fontSize: 14 + 'px',
    color: "rgba(255, 255, 255, 1)",
    lineHeight: 1.6,
    letterSpacing: '1px',
    opacity: 1,
  },
  23:{
    opacity: 1,
  },
  24:{
    fontSize: 14 + 'px',
    color: "rgba(255, 255, 255, 1)",
    backgroundColor: "#fff",
    opacity: 1,
  },
  25:{
    fontSize: 14 + 'px',
    color: "rgba(255, 255, 255, 1)",
    backgroundColor: "#fff",
    opacity: 1,
  },
  52:{
    fontSize: 14 + 'px',
    fontFamily: "默认字体",
    color: "rgba(255, 255, 255, 1)",
    backgroundColor: "rgba(255, 255, 255, 0)",
    opacity: 1,
    transform:'rotate(0deg)',
    flexDirection: ITEM_FLEX_DIRECTION_MAP.column,
    textAlign: 'center',
    lineHeight: 1.6,
  },
  62:{
    color: "#333",
    backgroundColor: "rgba(255, 255, 255, 1)",
    fontSize: 14 + 'px',
    border: 'none',
  },
  63:{
    color: "#333",
    backgroundColor: "rgba(255, 255, 255, 0)",
    fontSize: 16 + 'px',
    border: 'none',
    letterSpacing: '1px',
    fontWeight: 'normal',
    lineHeight: 1,
  },
  64:{
    color: "#333",
    backgroundColor: "rgba(255, 255, 255, 0)",
    fontSize: 14 + 'px',
    lineHeight: 1,
    textAlign: 'left',
  },
  65:{
    color: "#333",
    fontSize: 14 + 'px',
  },
  69:{
  },
  70:{
  },
  100: {
    transform:'rotate3d(0, 0, 1, 0deg)',
    opacity: 1,
    color: "#000",
    backgroundColor: "rgba(255, 255, 255, 0)",
    textAlign: 'left',
    textDecoration: 'none',
    fontWeight: 'normal',
    fontStyle: 'normal',
    fontSize: 14 + 'px',
  },
  101: {
    fontSize: 14 + 'px',
    fontFamily: "默认字体",
    textAlign: 'center',
    textDecoration: 'none',
    fontWeight: 'normal',
    fontStyle: 'normal',
    lineHeight: 2.4,
    letterSpacing: '1px',
    transform:'rotate3d(0, 0, 1, 0deg)',
    opacity: 1,
    color: "rgba(255, 255, 255, 1)",
    backgroundColor: "rgb(18, 123, 255)",
    backgroundImage:"",
    borderRadius: 0,
    border: 'none',
  },
  104: {
    opacity: 1,
    backgroundColor: "rgba(255, 255, 255, 1)",
    color: "#43475C",
    fontSize: 14 + 'px',
    lineHeight: 1.4,
    textAlign: 'center',
    fontWeight: 'normal',
    fontStyle: 'normal',
  },
  105: {
    opacity: 1,
    backgroundColor: "rgba(255, 255, 255, 1)",
    color: "#43475C",
    fontSize: 14 + 'px',
    lineHeight: 1.4,
    textAlign: 'center',
    fontWeight: 'normal',
    fontStyle: 'normal',
  },
  106: {
    transform:'rotate3d(0, 0, 1, 0deg)',
    opacity: 1,
    color: "rgb(67, 71, 92)",
    fontSize: 14 + 'px',
    backgroundColor: "rgba(255, 255, 255, 0)",
    lineHeight: 1.4,
    textAlign: 'center',
    fontWeight: 'normal',
    fontStyle: 'normal',
    letterSpacing: '1px',
  },
  107:{
    color: "#333",
    backgroundColor: "rgba(255, 255, 255, 0)",
    fontSize: 14 + 'px',
    lineHeight: 1,
    textAlign: 'left',
  },
  108:{
    color: "#333",
    backgroundColor: "rgba(255, 255, 255, 0)",
    fontSize: 14 + 'px',
    lineHeight: 1.6,
    textAlign: 'left',
    opacity: 1,
  },
  116:{
  },
  110: {
    fontSize: 14 + 'px',
    color: "#000",
    transform:'rotate(0deg)',
    opacity: 1,
  },
  112:{
    fontSize: 14 + 'px',
    fontFamily: "默认字体",
    color: "rgba(0, 0, 0, 1)",
    backgroundColor: "rgba(255, 255, 255, 0)",
    textAlign: 'center',
    textDecoration: 'none',
    fontWeight: 'normal',
    fontStyle: 'normal',
    lineHeight: 2.5,
    letterSpacing: '1px',
    transform:'rotate(0deg)',
    opacity: 1,
  },
  113:{
    fontSize: 12 + 'px',
    fontFamily: "默认字体",
    backgroundColor: "rgba(29, 161, 242, 1)",
    color: "rgba(255, 255, 255, 1)",
    textDecoration: 'none',
    fontWeight: 'normal',
    fontStyle: 'normal',
    lineHeight: 1.1,
    letterSpacing: '1px',
    opacity: 1,
  },
  114:{
    fontSize: 14 + 'px',
    color: "rgba(255, 0, 0, 1)",
    backgroundColor: "rgba(255, 255, 255, 0)",
    transform:'rotate(0deg)',
    opacity: 1,
  },
  115:{
    backgroundColor: "rgba(255, 255, 255, 0)",
    transform:'rotate(0deg)',
    opacity: 1,
    color: "rgba(35, 160, 171, 1)",
  },
  120:{
    backgroundColor: "rgba(29, 161, 242, 1)",
    backgroundImage: "",
    color: "rgba(255, 255, 255, 1)",
    borderRadius: 0,
    border: 'none',
    transform:'rotate(0deg)',
    opacity: 1,
  },
  500: {
    opacity: 1,
  }
}

export const ComponentTypesDom =  {
  1:{
    id:-1,
    cid:1,
    type: "wb-text",
    name: "WbText",
    title: '文本',
    tabName: 'text',
    conAttr: { width:36, height:20, top:0, left:0},
    commonAttr: { 
      isDynamic: false, isEdit: false, need: false, isShowNeed:true, isDisplayY: false, namePrefix: "", nameSuffix: "", nameNum: 0,
      fontSize: 14, fontWeight:0, text:"", isVertical: false, placeholder:"", placeholerColor: PLACEHOLDER_COLOR_TYPE[0].value, textShadowColor: '',
      borderStyle: 'none', borderRadius: 0, borderSize: 0, borderColor: '#fff', isGlow: false,
      isGradient: false, gradientDirection:GRIDIENT_DIRECTION[0].value, isSplitGsap: false,
      gradientColors: "#b8781b, #fceda5, #d3a30f, #fceda5, #a97511", limitTextNum:1000,
      scrollbarType: SCROLLBER_TYPE[0].value, rotate:0, letterSpacing: 0, tableName:"", dataKey: '',
      isRandom: false, isHtml: false, customFontStyle: "", paddingTB: 0, paddingLR: 0,
    },
  },
  2:{
    id:-1,
    cid:2,
    type: "wb-img",
    name: "WbImg",
    title: '图片',
    tabName: 'img',
    conAttr: { width:100, height:100, top:0, left:0},
    commonAttr: { 
      isDynamic: false, rotate: 0, isFullScreen: false, spriteSheetParams: '',
      url: '', alt: '', name: '', paddingTB: 0, paddingLR: 0,
      borderStyle: 'none', borderRadius: 0, borderSize: 0, borderColor: '#fff',
      isGradient: false, gradientDirection: GRIDIENT_DIRECTION[0].value,
      gradientColors: "#b8781b, #fceda5, #d3a30f, #fceda5, #a97511",
      objectFit: '', 
      filter: {
        isBlur: false, blur: 5, isBrightness: false, brightness:1, isContrast: false, contrast: 1,
        isShadow: false, offsetX: 8, offsetY: 8, blurRadius: 8, spreadRadius: 0, shadowColor: '#fff',
        isGrayscale: false, grayscale: 0, isHueRotate: false, hueRotate: 0, isInvert: false, invert: 0,
        isSaturate: false, saturate: 1, isSepia: false, sepia: 0,
      },
      dataKey: '', isLongPressSaveImg: false,
      isSaveImg:false, // 在app上是否可以进行图片保存
      isForm: false //是否作为表单数据提交
    },
  },
  3:{
    id:-1,
    cid:3,
    type: "wb-audio",
    name: "WbAudio",
    title: '音频',
    tabName: 'audio',
    conAttr: { width:80, height:80, top:0, left:0},
    commonAttr: { 
      url: '', name: '', artist: '', link:'', lrc: '', cover: '', theme: 'transparent', params: '', isFiexed: false, isMini: false, isAutoPlay: false, volume: 1, isDisplayControls: false
    },
  },
  4:{
    id:-1,
    cid:4,
    type: "wb-video",
    name: "WbVideo",
    title: '视频',
    tabName: 'video',
    conAttr: { width:100, height:100, top:0, left:0},
    lists: [
      { time: '', popId: '', compId:'' },
    ],
    commonAttr: { 
      isAutoPlay: false, playBtnColor: '#fff', url: DEFAULT_MEDIAS.video, poster: DEFAULT_MEDIAS.img, link: '', alt: '',
      popId: 0, pageId: 0, compId: '', isFullScreen: false, isDisplayControls: false, isLoop: false, repeatStartTime: '',
      isAddTimeSection: false, isPauseInTimeSection: false, isMute: false, resizeType: RESIZE_TYPE[0].value, isPreload: true,
    },
  },
  10:{
    id: -1,
    cid: 10,
    type: "wb-videos",
    name: "WbVideos",
    title: '视频组',
    tabName: 'videos',
    lists:[{
      name: '',
      url: DEFAULT_MEDIAS.video,
      poster: DEFAULT_MEDIAS.img,
      link: '',
      alt: '',
    }],    
    conAttr: { width:100, height:100, top:0, left:0},
    commonAttr: { 
      paginationType: PAGINATION_TYPE[0].value,
      paginationColorType: CAROUSEL_COLOR_TYPES[0].value,
      carouselType: CAROUSEL_TYPES[0].value, slideNum: 1, slideSpace: 0,
      autoTurnPage: false, turnPageTime: 2, isMute: false, initialSlide: 0,
      preBtnUrl: '', nextBtnUrl:'', swiperBtnWidth: "", swiperBtnHeight: "", isLoop: false,
      maskColor: 'rgba(0,0,0,0.1)', playBtnColor: '#fff', playBtnWidth: 100, playBtnHeight: 100, playBtnFontSize: 40,
      borderStyle: 'solid', borderRadius: 100, borderSize: 4, borderColor:'#fff', 
    },
  },
  11:{
    id: -1,
    cid: 11,
    type: "wb-imgs",
    name: "WbImgs",
    title: '图片组',
    tabName: 'imgs',
    lists: [{
      name: '',
      url: DEFAULT_MEDIAS.img,
      link: '',
      schema: '',
      alt: '',
    }],
    conAttr: { width:100, height:100, top:0, left:0},
    commonAttr: {
      paginationType: PAGINATION_TYPE[0].value, effect: 'slide', effectParams: '',
      paginationColorType: CAROUSEL_COLOR_TYPES[0].value,
      carouselType: CAROUSEL_TYPES[0].value, slideNum: 1, slideSpace: 0, isLoop: true,
      autoTurnPage: false, turnPageTime: 2, initialSlide: 0,
      borderStyle: 'none', borderRadius: 0, borderSize: 2, borderColor:'',
      paddingTB: 0, paddingLR: 0, isOtherBtnTrigger: false,
      preBtnUrl: '', nextBtnUrl:'', swiperBtnWidth: "", swiperBtnHeight: "",
      itemBGColor: '', itemBorderSize: 0, itemBorderColor: '', itemWidth:0, itemHeight: 0,
    }
  },
  14:{
    id: -1,
    cid: 14,
    type: "wb-timer",
    name: "WbTimer",
    title: '计时属性',
    tabName: 'timer',
    oriEvents: [ {controlId: "timer", eventType: "timer"} ],
    conAttr: { width:220, height:28, top:0, left:0},
    commonAttr: { 
      pattern:TIMER_PATTERN[0].value, fontSize: 14 
    },
  },
  18:{
    id: -1,
    cid: 18,
    type: "wb-menu",
    name: "WbMenu",
    title: '菜单栏',
    tabName: 'menu',
    lists:[
      {url:"", icon: '', title:"组合", eventType:'', value:'', bgUrl: '', selectedBgUrl:''},
      {url:"", icon: '', title:"地图", eventType:'', value:'', bgUrl: '', selectedBgUrl:''},
      {url:"", icon: '', title:"自定义", eventType:'', value:'', bgUrl: '', selectedBgUrl:''},
    ],
    
    bgUrl: '',
    conAttr: { width:COMMON_WIDTH/2, height:60, left:0, top:0},
    commonAttr: {
      positionType: 0, isBottom: false, isRight: false,
      isVisible: true, tabIndex:0, paddingTB: 6, paddingLR: 6, selectedColor: '#ff0',
      fontSize: 14, itemBorderRadius: 1, itemBGColor: '', itemSeletedBGColor: '', itemWidth: 0,
      itemHeight: 0, marginTB: 4, heightEffectParams: '', isFiexed: false
    },
  },
  20:{
    id: -1,
    cid: 20,
    type: "wb-camera",
    name: "WbCamera",
    title: '打开相机',
    tabName: 'camera',
    lists: [],
    conAttr: { width:200, height:300, top:0, left:0 },
    commonAttr: {
      canvasColor: "#e6e6e6", quality: 2, isAutoOpen: false,
      isCutImage: false, cropFrameUrl: "https://static.hd.xxx.com/upload/biz/9/774215.png", cropFrameLineUrl: "https://static.hd.xxx.com/upload/biz/14/902154.png", cutImageWidth: 452,
      isPlaceholderImg: false, placeholderUrl: "", placeholder: "请打开相册", placeholderFontSize: 14, placeholderColor: "#000", initialImage: "",
      zoomSpeed:3, fSizeLimit: 0,
      isShowRemoveButton: true, removeButtonColor:"rgba(0, 0, 0, 1)", delButtonSize: 26,
      isShowLoading: true, loadingColor: "rgba(96, 96, 96, 1)", loadingSize: 50,
      borderStyle: 'solid', borderRadius: 1, borderSize: 1, borderColor:'rgba(0, 0, 0, 1)',
      isPoster: false, isPostInitialImg: false, saveImgType: SAVE_IMG_DATA_TYPES[0].value, saveImgQuality: 0.8
    },
  },
  21:{
    id: -1,
    cid: 21,
    type: "wb-turn-book",
    name: "WbTurnBook",
    title: '翻书动画',
    tabName: 'turnBook',
    lists:[
      { url: '', title:'' }
    ],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/2, top:0, left:0 },
    commonAttr: { 
      isFullScreen: false, pageId: 0, popId: 0, resizeType: RESIZE_TYPE[0].value 
    }
  },
  22:{
    id: -1,
    cid: 22,
    type: "wb-scroll-container",
    name: "WbScrollContainer",
    title: '滚动容器',
    tabName: 'scrollContainer',
    lists:[
      { url: '', link: '', position: '' }
    ],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/2, top:0, left:0 },
    commonAttr: {
      isFullScreen: false, innerHtml: '', url:'', isVertical: true, slidesPerView: 4.5, isTouchMove: false, bubbleUrl: '', effectUrl: '', cropUrls: '',
      itemBgUrl:'', itemBgWidth:0, itemBgHeight:0, itemWidth:0, itemHeight:0, marginTB: 0, marginLR: 0, paddingTB: 0, paddingLR: 0, imgRelateCompId:'', 
      rotate: 0, scrollbarType: SCROLLBER_TYPE[0].value, fontSize: 14,
    }
  },
  23:{
    id: -1,
    cid: 23,
    type: "wb-moveable",
    name: "WbMoveable",
    title: '拖动交互',
    tabName: 'moveable',
    lists: [],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/2, top:0, left:0 },
    commonAttr: { 
      isFullScreen: false, cornerColor: "#127BFF", borderColor: "#127BFF"
    }
  },
  24:{
    id: -1,
    cid: 24,
    type: "wb-calendar",
    name: "WbCalendar",
    title: '日历',
    tabName: 'calendar',
    oriEvents:  [ {controlId: "1001", eventType: "vote"} ],
    lists: [],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/2, top:0, left:0 },
    commonAttr: { 
      calendarType: CALENDER_TYPE_MAP.currentMonth, minDate: '2012/2/1', maxDate: '2012/2/31', backgroundColor: '#f2f2f2', selectedBackgroundColor: 'transparent', color: "#000", selectedColor: '#cf8910', selectedBorderColor: '#2E8B57', selectedBorderUrl: '', fontSize: 28,
    }
  },
  25:{
    id: -1,
    cid: 25,
    type: "wb-grasp-doll",
    name: "WbGraspDoll",
    title: '抓娃娃',
    tabName: 'graspDoll',
    lists: [],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/4, top:0, left:0 },
    commonAttr: { 
      dollUrl: '', poleUrl: '', pawUrl: '', poleHeight: 100,
    }
  },
  52:{
    id:-1,
    cid:52,
    // oriEvents:  [{controlId: "1013", eventType: "user"},],
    type: "wb-head",
    name: "WbHead",
    title: '微博头像',
    tabName: 'head',
    styles: {fontSize:14},
    btn:{
      cid: COMPONENT_TYPES.wb_btn,
      styles:{
        color:"rgba(0, 0, 0, 1)",
        backgroundColor: "rgba(0, 0, 0, 0)",
      },
      commonAttr: { paddingTB: 6, paddingLR: 6, fontSize:14 }
    },
    dataKeys: {
      pic_url: "头像",
      name: "名字",
    },
    conAttr: { width:140, height:120, top:0, left:0},
    commonAttr: { 
      fontSize: 14, rotate: 0, namePrefix: "", nameSuffix: "", nameNum: 20, isCustomText: false, textPrefix: '',
      itemPicWidth: 60, itemPicHeight: 60, marginTB: 0, marginLR: 0, userDescription: '',
      borderStyle: 'none', borderRadius: 30,  borderSize: 2, borderColor:'', borderImgUrl:'https://static.hd.xxx.com/upload/biz/33/233271.png'
    },
  },
  63: {
    id:-1,
    cid:63,
    oriEvents: [{controlId: "1010", eventType: "reposts"},],
    type: "wb-carousel",
    name: "WbCarousel",
    title: '轮播组',
    tabName: 'carousel',
    lists: [],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/3, top:0, left:0},
    controls: {
      1010:{id:"",controlId:"1010",name:"转发微文组",type:"wb_cardlist",
        data:{
          elements:[
            { mid: "4425543531731773", url: "https://static.hd.xxx.com/upload/biz/26/114090.jpg",
              push_text: "在这个世界上，一星陨落，黯淡不了星空灿烂，一花凋零，荒芜不了整个春天。"   },
            { mid: "4425543531731773", url: "https://static.hd.xxx.com/upload/biz/26/551193.jpg",
              push_text: "蛾儿雪柳黄金缕。笑语盈盈暗香去。众里寻他千百度，蓦然回首，那人却在灯火阑珊处。"   },
            { mid: "4425543531731773", url: "https://static.hd.xxx.com/upload/biz/26/109017.jpg",
              push_text: "故事的小黄花，从出生那年就开着；童年的荡秋千，随记忆一直晃到现在。"  }
          ]
        }
      }
    },
    commonAttr: _.merge(_.cloneDeep(defaultCarouselCommonAttr), {
      isBtn: true,
      bottomDistance: -10, borderSize: 0,
      itemWidth: 350/2, itemHeight: 490/2, itemMarginTB: 40/2, itemMarginLR: 30, itemPaddingTB: 70/2, itemPaddingLR: 10, 
      itemBgUrl: "https://static.hd.xxx.com/upload/biz/26/684144.png", customFontStyle: ''
    }),
    dataKeys: {
      pic_url: "头像",
      name: "名字",
      text: "博文"
    },
    btn: _.merge(_.cloneDeep(defaultBtnAttr), {
      bgUrl: "https://static.hd.xxx.com/upload/biz/26/441584.png",
      commonAttr: {
        fontSize: 14,
        marginLR: 6, marginTB: 6, paddingLR: 60, paddingTB: 12,
      },
      conAttr: { width: 484/2, height: 92/2, left: 0, top: 0 },
      styles:{
        color: "rgba(0, 0, 0, 0)",
        backgroundColor: "rgba(0, 0, 0, 0)",
        backgroundImage: "url(https://static.hd.xxx.com/upload/biz/26/441584.png)",
      },
    }),
  },
  64: {
    id: -1,
    cid: 64,
    type: "wb-common-list",
    name: "wbCommonList",
    title: '通用列表',
    tabName:'lists',
    lists: [
      {
        title: '',
        url: "https://static.hd.xxx.com/upload/biz/1/496675.jpg",
        text: "匠心炼造绝美好物，精致生活更有仪式感",
        link: "",
        foldUrl: '',
      }
    ],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/6, top:0, left:0 },
    commonAttr: _.merge(_.cloneDeep(defaultCommonListCommonAttr), {
      columnNum: 3
    }),
    btn:{
      cid: COMPONENT_TYPES.wb_btn,
      commonAttr:{
        fontSize:14,
      }
    },
    dataKeys: {
      text: "博文"
    }
  },
  65: {
    id: -1,
    cid: 65,
    type: "wb-is-post-event",
    name: "WbIsPostEvent",
    title: '全局发送',
    tabName: 'postEvent',
    conAttr: { width:100, height:20, top:0, left:0 },
    commonAttr: { 
      fontSize: 14, text:'关注', interfaceType: GLOBAL_POST_TYPES[0].value,
      borderColor: "#f2f2f2", backgroundColor: "#127bff", selectedCheckboxUrl: '', checkboxUrl:''},
  },
  69: {
    id:-1,
    cid:69,
    type: "wb-table",
    name: "WbTable",
    title: '数据表格',
    tabName: 'table',
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/2, top:0, left:0},
    lists: [],
    commonAttr: { 
      isDynamic: false, isEdit: false, isScrollable: false, scrollbarType: SCROLLBER_TYPE[0].value, displayNum: 0, itemType: TABLE_ITEM_TYPE[0].value, 
      vhtml:'', tableKeys: ''
    },
  },
  70: {
    id: -1,
    cid: 70,
    type: "wb-slot-machine",
    name: "WbSlotMachine",
    title: '老虎机',
    tabName: 'slotMachine',
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/2, top:0, left:0},
    lists: [
      { url: '' }
    ],
    commonAttr: { spinsTime: 1.5, animateTime: 1, pauseTime: 2 },
  },
  100: {
    id: -1,
    cid: 100,
    type: "wb-input",
    name: "WbInput",
    title: '输入框',
    tabName: 'input',
    conAttr: { width:242, height:46, top:0, left:0 },
    commonAttr: { 
      isAuto: false, userAttr: '', fontSize: 14, customFontStyle: '', limitTextNum: 20, borderStyle: 'none', borderSize: 0, borderColor:"#000", borderRadius: 2,
      rotate: 0, need: false, isShowNeed: true, name: "other", placeholder: "提示文本", placeholerColor: PLACEHOLDER_COLOR_TYPE[0].value, value:"", tableName:"" 
    },
  },
  101: {
    id: -1,
    cid: 101,
    oriEvents:  [ {controlId: "submit", eventType: "submit"} ],
    type: "wb-btn",
    name: "WbBtn",
    title: '按钮样式',
    tabName: 'submit',
    bgUrl: '',
    selectedBGUrl: '',
    conAttr: { width:242, height:46, top:0, left:0 },
    commonAttr: { 
      fontSize: 14, fontWeight:0, rotate:0, marginLR: 0, marginTB: 0, paddingLR: 0, paddingTB: 0, width:0, height:0,
      borderStyle: 'none', borderRadius: 0, borderSize: 0, borderColor: '#fff', 
      isSelected: false, selectedColor: '', selectedBGColor: '', 
      isDisabled: false, isGrey: false, 
      title: '提交', btnPosition: '', 
    },
  },
  102:{
    id: -1,
    cid: 102,
    type: "contacts",
    name: "contacts",
    components: [
      {cid: COMPONENT_TYPES.wb_input, conAttr:{top:100, left:100}, conStyles:{top:100+'px', left:100+'px'}, commonAttr:{need: true, name: "name", placeholder: "姓名", value:""}},
      {cid: COMPONENT_TYPES.wb_input, conAttr:{top:220, left:100}, conStyles:{top:220+'px', left:100+'px'}, commonAttr:{need: true, name: "phone", placeholder: "电话", value:""}},
      {cid: COMPONENT_TYPES.wb_input, conAttr:{top:360, left:100}, conStyles:{top:360+'px', left:100+'px'}, commonAttr:{need: false, name: "email", placeholder: "邮箱", value:""}},
      {cid: COMPONENT_TYPES.wb_btn, conAttr:{top:480, left:100}, conStyles:{top:480+'px', left:100+'px'}, title:"提交"},
    ],
    commonAttr: {  
      isReplace: false 
    },
  },
  103:{
    id: -1,
    cid: 103,
    type: "wb-form-score",
    name: "WbFormScore",
    title: '表单计分',
    tabName: 'formScore',
    lists: _.cloneDeep(FORM_SCORE_LISTS),
    conAttr: { width:375, height:584, top:0, left:0 },
    defaultValue: "",
    commonAttr: { 
      fontSize: 12, isRelate: false, isDisplayRelate: true, isViewAnswer: false, questionPrefix: "A,B,C,D", serialPrefix: "Q"
    },
    btn:{
      cid: COMPONENT_TYPES.wb_btn,
      styles: {
        lineHeight: 1.8,
      },
      commonAttr:{
        fontSize:14,
      }
    },
  },
  104: {
    id: -1,
    cid: 104,
    type: "wb-radio",
    name: "WbRadio",
    title: '单选菜单',
    tabName: 'radioCheckbox',
    lists: [
      {
        id:'', text:'单选一', link:'', jumpUrl:'', pageId:'',url:'',
        textColor:'', bgColor:'', selectedTextColor:'', seletedBgColor:'',
        relateUrl:'', relateType:'', 
      }
    ],
    conAttr: { width:COMMON_WIDTH/2, height:80, top:0, left:0 },
    commonAttr: {  
      need: true,
      title: "多功能，速度，懒人必备！", value: "", itemType: RADIO_CHECKBOX_TYPE[0].value,
      isColumn: true, columnNum:3, isPic: false, customFontStyle: '',
      marginTB: 0, marginLR: 0, paddingTB: 0, paddingLR: 0, fontSize: 14,
      itemMarginTB: 4, itemMarginL: 0, itemMarginR: 0, itemPaddingTB: 4, itemPaddingL: 0, itemPaddingR: 0, 
      itemWidth: 0, itemHeight: 0, iconWidth: 0, iconHeight: 0, itemBorderRadius: 0, itemBorderSize: 0, itemBorderColor: 'rgba(18, 123, 255, 1)', itemBorderStyle: 'none',
      isEachSelectedColor: false, tableName:"", isOther: false, otherPlaceholder: "其他",
      itemStyles: { fontSize: 14, lineHeight:1, letterSpacing:1, backgroundColor: "#0055b0", color: "#fff", btnBgUrl: '', url:'' },
      selectedStyles: { backgroundColor: "#0055b0", color: "#fff", btnBgUrl: '', url: '' },
      isNotForm: false, shape: RADIO_CHECKBOX_SHAPE_TYPES[0].value
    },
  },
  105: {
    id: -1,
    cid: 105,
    type: "wb-checkbox",
    name: "WbCheckbox",
    title: '多选菜单',
    tabName: 'radioCheckbox',
    lists: [
      {id:'', text: '多选一', jumpUrl:'', url:'',}
    ],
    conAttr: { width:COMMON_WIDTH/2, height:100, top:0, left:0 },
    commonAttr: { 
      need: true, min:0, max:4, link: '',
      title: "多功能，速度，懒人必备！", itemType: RADIO_CHECKBOX_TYPE[0].value,
      isColumn: true, columnNum:3, isPic: false, customFontStyle: '',
      marginTB: 0, marginLR: 0, paddingTB: 0, paddingLR: 0, fontSize: 14,
      itemMarginT: 4, itemMarginB: 4, itemMarginL: 0, itemMarginR: 0, 
      itemPaddingTB: 4, itemPaddingL: 0, itemPaddingR: 0, 
      itemWidth: 0, itemHeight: 0, itemBorderRadius: 0, itemBorderSize: 0, itemBorderColor: 'rgba(18, 123, 255, 1)', itemBorderStyle: 'none',
      tableName:"", isOther: false, otherPlaceholder:"其他",
      itemStyles: { fontSize: 14, lineHeight:1, letterSpacing:1, backgroundColor: "#0055b0", color: "#fff", btnBgUrl: '', url: '' },
      selectedStyles: { backgroundColor: "#0055b0", color: "#fff", btnBgUrl: '', url: ''},
      shape: RADIO_CHECKBOX_SHAPE_TYPES[1].value
    },
  },
  106: {
    id: -1,
    cid: 106,
    type: "wb-dropdown",
    name: "WbDropdown",
    title: '下拉属性',
    tabName: 'dropdown',
    lists: [{id:"", text:""}],
    conStyles: {width:0, height:0, position:'absolute', zIndex: 20, top:0, left:0},
    conAttr: { width:COMMON_WIDTH/2, height:46, top:0, left:0 },
    commonAttr: { 
      need: true, title: '', placeholder: '请选择', tableName:"", fontSize: 14, 
      arrowBtnColor: "rgba(0, 0, 0, 0)", isCustomData: false, customData: '', customDataFirstKey:'' , isDefaultSelected: false
    },
  },
  107:{
    id: -1,
    cid: 107,
    type: "wb-form",
    name: "WbForm",
    title: '表单问答',
    tabName: 'form',
    lists: _.cloneDeep(FORM_LISTS),
    conAttr: { width:375, height:584, top:0, left:0 },
    commonAttr: { 
      fontSize: 12, isRelate: false, isDisplayRelate: true, title: '中小企业开复工情况调查问卷',
    },
    btn:{
      cid: COMPONENT_TYPES.wb_btn,
      styles: {
        lineHeight: 1.8,
      },
      commonAttr:{
        fontSize:14,
      }
    },
  },
  108:{
    id: -1,
    cid: 108,
    type: "wb-address",
    name: "WbAddress",
    title: '地址',
    tabName: 'address',
    conAttr: { width:375, height:50, top:0, left:0 },
    commonAttr: { 
      fontSize: 12, tableName: '', placeholder: '', arrowBtnColor: "transparent",
    },
  },
  117:{
    id: -1,
    cid: 117,
    type: "wb-switch",
    name: "WbSwitch",
    title: '开关',
    tabName: 'switch',
    conAttr: { width:50, height:50, top:0, left:0 },
    commonAttr: { 
      fontSize: 12, tableName: '', need: false
    },
  },
  116:{
    id: -1,
    cid: 116,
    type: "wb-upload",
    name: "WbUpload",
    title: '上传文件',
    tabName: 'upload',
    conAttr: { width:50, height:50, top:0, left:0 },
    commonAttr: { tableName: "", need: true, uploadCount: 1, uploadLimitSize: 2, saveImgType: SAVE_IMG_DATA_TYPES[0].value, saveImgQuality: 0.8 },
  },
  110:{
    id: -1,
    cid: 110,
    oriEvents:  [ {controlId: "1002", eventType: "number"} ],
    type: "wb-process",
    name: "WbProcess",
    title: '进度条',
    tabName: 'process',
    conAttr: { width:COMMON_WIDTH/3, height: 24, top:0, left:0 },
    commonAttr: { 
      fontSize:14, rotate: 0, barColor: '#fff', url:'', barUrl: '', barPointUrl: '', isLoadAssets: false, pageId: '', delayTime: 0,
      borderStyle: 'solid', borderRadius: 14, borderSize: 0, borderColor: '#fff', 
      borderBgColor: 'rgba(218,233,251,0.8)', 
      isDisplayPercent: false, isRightPercentInfo: false, percentPaddingTB: 0, percentPaddingLR: 0, itemType: PROCESS_ITEM_TYPES[0].value, 
      percentStr: '已有$num$人参与', percentStyle: '',
      triangleColor: '#666',  paddingTB: 0, paddingLR: 0,  textShadowColor: '', isTriangle: false,
    },
  },
  112: {
    id: -1,
    cid: 112,
    type: "wb-flip-mc",
    name: "WbFlipMc",
    title: '上下翻转动画',
    tabName: 'flipMc',
    lists: [
      { prefix:'', text: '翻滚文字', suffix: '' },
    ],
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/16, top:0, left:0 },
    commonAttr: { 
      rotate:0, opacity:1, fontSize:14, intervalTime: 2000 
    },
  },
  113: {
    id: -1,
    cid: 113,
    type: "wb-notice-bar",
    name: "WbNoticeBar",
    title: '滚动动画',
    tabName: 'noticeBar',
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/24, top:0, left:0 },
    commonAttr: { 
      opacity:1, fontSize:12,
      letterSpacing:0, text: '滚动文本',
      mode: NOTICE_BAR_MODE[0].value, isScrollable:true ,isWrapable:false 
    },
  },
  114: {
    id: -1,
    cid: 114,
    type: "wb-icon",
    name: "WbIcon",
    title: '字体图标',
    tabName: 'icon',
    conAttr: { width:50, height:50, top:0, left:0 },
    commonAttr: { 
      rotate:0, opacity:1, fontSize:40, icon: 'jy-icon-flower' 
    },
  },
  115: {
    id: -1,
    cid: 115,
    type: "wb-svg-icon",
    name: "WbSvgIcon",
    title: 'svg图标',
    tabName: 'svgIcon',
    conAttr: { width:50, height:50, top:0, left:0 },
    commonAttr: { 
      rotate:0, opacity:1, url: SVG_D_LIST[0].value, duration: 20, type: SVG_ANIMATE_PLAY_TYPE[0].value, start: SVG_ANIMATE_START_TYPE[1].value, delay: 10, dashGap: 20, 
      reverseStack: false, pathTimingFunction: SVG_ANIMATE_EASE_TYPE[0].value, animTimingFunction: SVG_ANIMATE_EASE_TYPE[0].value, strokeWidth: 4, isDrag: true,
      isSvga: false, svgaUrl: '',
    },
  },
  120:{
    id: -1,
    cid: 120,
    type: "wb-bg",
    name: "WbBg",
    title: '背景',
    tabName: 'bg',
    conAttr: { width:COMMON_WIDTH/2, height:COMMON_HEIGHT/4, top:0, left:0 },
    commonAttr: { 
      isFullScreen: false,
      placeholder:"", bgUrl:'', maskUrl: '', bgPositionRepeatType: BG_POSITION_REPEAT_TYPES_MAP.centerTop,
      backgroundColor: '#fff', isGradient:false, gradientDirection: GRIDIENT_DIRECTION[0].value,
      gradientColors:'#4bb0ff, #6149f6', opacity: 1, rotate: 0, isTouchmove: false,
      borderStyle: 'none', borderRadius: 0, borderColor: '#000',  borderSize: 2,
    },
  },
  500: {
    id: -1,
    cid: 500,
    type: "group-component",
    name: "GroupComponent",
    title: '打组组件',
    tabName: 'groupComp',
    conAttr: { width:COMMON_WIDTH, height:COMMON_HEIGHT, top:0, left:0, realTop:0, otherCompHeight:0 },
    components: [],
    commonAttr: { 
      isGroupGsap: false, intervalTime: 0.1, durationTime: 1, opacity: 1, scale: 1, offsetX: 0, offsetY: 0, 
      isFullScreen: false, pageIndex: 0, bgColor: '', bgUrl: '', classNames: '', 
      isRepeat: false, from: GSAP_FROM_TYPES_MAP.random, ease: GSAP_EASE_TYPES_MAP.none, easeInOut: GSAP_EASE_INOUT_TYPES_MAP.in, axis: GSAP_AXIS_TYPES_MAP.none,
      isScrollTriggerAnimate: false, scrollTriggerType: SCROLL_TRIGGER_TYPE[0].value, 
      scrollTrigger: { 
        matchCompId: '',  groupClassName: '', items: '', speed: '', 
        ease: GSAP_EASE_TYPES_MAP.none, easeInOut: GSAP_EASE_INOUT_TYPES_MAP.in, duration: 1, offsetX: 100, offsetY: 100,
        scaleX: 0, start: 'top bottom', end: 'top top', rotation: 0, isPin: false,
      },
      leftPercent: '', marginLeft: '', isPercent: false, injectJsClass: '', injectJsClassParams: ''
    },
  },
  501: {
    id: -1,
    cid: 501,
    type: "group-carousel",
    name: "GroupCarousel",
    title: '打组轮播组',
    tabName: 'groupCarousel',
    conAttr: { width:COMMON_WIDTH, height:COMMON_HEIGHT, top:0, left:0, realTop:0, otherCompHeight:0 },
    components: [],
    commonAttr: { 
      isFullScreen: false, listType: LIST_TYPE_MAP.commonList, itemHeight: 128, 
    },
  },
}
